package com.ruoyi.newRepair.service;

import com.ruoyi.newRepair.domain.*;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public interface EquipmentAnalysisService {
    // 设备完成时长统计图
    Map<String, Map<String, Object>> getEquipmentStats();

    // 帕累托图
    List<FaultCategoryStats> getFaultCategoryStats();

    // 设备类型统计故障
    Map<String, Object> getFailureStatistics(String startDate, String endDate); // 参数名与实现类一致

    // 聚类分析
    String analyzeClusters() throws Exception; // 同步异常声明

    // 控制图
    Map<String, Object> generateControlChartData();

    // 故障详情
    Map<String, Object> getFailureDetails(String deviceType, String startStr, String endStr);

    // 基础统计
    Map<String, Object> getBasicStatistics(String equipmentNo, LocalDate startDate, LocalDate endDate) throws Exception;

    // 维修编号统计
    Map<String, Object> getRepairNumberStatistics();

    //设备编号统计
    Map<String, Object> getDetails(String equipmentNo, String startDate, String endDate);

    List<RepairOrder> getEquipmentNoDetails(String equipmentNo, /*RepairStatsDTO repairStatsDTO,*/ String startDate, String endDate, String completedByName);

    Long getEquipmentNoDetailsActions(String equipmentNo, String startDate, String endDate, String completedByName);

    //    MTTR
    Map<String, Object> countMTTR(List<String> equipmentIds, String startDate, String endDate);

    //    设备类型查询
    List<EquipmentType> getEquipmentId();

    //    MTBF
    Map<String, Object> countMTBF(List<String> equipmentIds, String startDate, String endDate);

    List<EquipmentCountDTO> countEquipment();

    //    总利用率
    Map<String, Object> countUR(List<String> equipmentIds, String startDate, String endDate);

    //    总维修时长
    Map<String, Object> countfix(List<String> equipmentIds, String startDate, String endDate);

    //    总故障周趋势
    Map<String, Object> totalFailure();

    //    上周设备故障分布图
    LastWeekFailure getLastWeekFailureDetails();

    //    具体设备维修单分布
    Map<String, Object> getSpecificEquipment(String deviceType);

    //    OEE设备选取
    List<EquipmentType> getOEEEquipmentId();

    //OEE统计
    Map<String, Object> countOEE(List<String> machineNos, String processSiteNo, String startDate, String endDate);
}